package com.desaysv.dragrvitem.adapter.holder;

import android.view.ViewGroup;

import androidx.annotation.NonNull;

/**
 * ViewHolder{@link BaseViewHolder}
 *
 * @see <a href="https://juejin.cn/post/6844903472601497614"/>
 * @see <a href="https://github.com/free46000/MultiItem"/>
 */
public abstract class BaseViewHolderManager<T> extends ViewHolderManager<T, BaseViewHolder> {
    @Override
    public abstract void onBindViewHolder(BaseViewHolder holder, T t);

    @NonNull
    @Override
    public BaseViewHolder onCreateViewHolder(@NonNull ViewGroup parent) {
        BaseViewHolder viewHolder = new BaseViewHolder(getItemView(parent));
        onCreateViewHolder(viewHolder);
        return viewHolder;
    }

    /**
     * {@link #onCreateViewHolder}
     */
    protected void onCreateViewHolder(@NonNull BaseViewHolder holder) {
    }

}